package com.winz.cultureapp.adapter;

import android.content.Context;
import android.view.View;

import com.winz.cultureapp.R;
import com.winz.cultureapp.base.AbsBaseAdapter;
import com.winz.cultureapp.entity.SeatListBean;

/**
 * 选择座位
 */
public class SelSeatAdapter extends AbsBaseAdapter<SeatListBean.DataBean.ListBean>{
    public SelSeatAdapter(Context context, boolean isNeedToRemember, int resid) {
        super(context, isNeedToRemember, resid);
    }

    @Override
    public void bindDatas(int position, View convertView, ViewHolder viewHolder, SeatListBean.DataBean.ListBean data) {
        switch (data.seatStatus){
            case 1:
                if (data.isSel){
                    viewHolder.bindImageView(R.id.iv_pic,R.drawable.icon_sel_seat_ing);
                }else {
                    viewHolder.bindImageView(R.id.iv_pic,R.drawable.icon_sel_seat_nor);
                }
                break;
            case 0:
            case 2:
            case 3:
                viewHolder.bindImageView(R.id.iv_pic,R.drawable.icon_sel_seat_sel);
                break;
        }

    }
}
